home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / tex / lindner / latex_pl.zoo / texinput / stdinput / stdinput.lzh / TUGBOAT.CMN < prev    next >
Encoding:
Text File  |  1992-04-27  |  28.2 KB  |  916 lines

  1. %% @latexfile{
  2. %%     filename="tugboat.cmn",
  3. %%     version="1.10",
  4. %%     date="8-Mar-1992",
  5. %%     filetype="common macros for TUGboat",
  6. %%     copyright="Copyright (C) TeX Users Group.
  7. %%            Copying of this file is authorized only if either:
  8. %%            (1) you make absolutely no changes to your copy, OR
  9. %%            (2) if you do make changes, you first rename it to some
  10. %%                other name.",
  11. %%     author="TeX Users Group",
  12. %%     address="TeX Users Group",
  13. %%            P. O. Box 9506,
  14. %%            Providence, RI 02940,
  15. %%            USA",
  16. %%     telephone="401-751-7760",
  17. %%     email="Internet: TUGboat@Math.AMS.com",
  18. %%     codetable="ISO/ASCII",
  19. %%     checksumtype="line count",
  20. %%     checksum="894",
  21. %%     keywords="tex users group, tugboat, common macros",
  22. %%     abstract="This file contains macros common to both
  23. %%            the PLAIN and LaTeX style files for TUGboat,
  24. %%            the Communications of the TeX Users Group.
  25. %%            Among other things, it contains supplementary
  26. %%            definitions for abbreviations and logos that
  27. %%            appear in TUGboat."
  28. %%     }
  29. %%
  30. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  31. % !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
  32. % This file was modified by S. Lindner to fit the needs of the New
  33. % Font selection Scheme. The line
  34. %
  35. %   \def\midrtitle{\ifPrelimDraft {{\tensl preliminary draft, \Now}}\fi}
  36. %
  37. % is now replaced by the construction
  38. %
  39. %   \@ifundefined{selectfont}
  40. %      {
  41. %      \def\midrtitle{\ifPrelimDraft {{\tensl preliminary draft, \Now}}\fi}
  42. %      }
  43. %      {
  44. %      \def\midrtitle{\ifPrelimDraft {{\size{10}{12pt}\sl preliminary draft, \Now}}\fi}
  45. %      }
  46. \def\fileversion{v1.10}
  47. \def\filedate{8 March 1992}
  48.  
  49. \message{File `TUGBOAT.CMN' \fileversion \space\space <\filedate>}
  50. \message{Modified for NFSS by S. Lindner, 27 April 1992}
  51. %
  52. %               *****     TUGBOAT.CMN   *****
  53. %
  54. %       See the bottom of the file (after \endinput) for a list of
  55. %       items defined.
  56. %
  57.  
  58. % *************************************************************************
  59.  
  60. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  61. %
  62. %     *****  helpful shorthand  *****
  63. %
  64.  
  65. %  The following allow for easier changes of category.  These require that
  66. %  the character be addressed as a control-sequence: e.g. \makeescape\/ will
  67. %  make the / an escape character.
  68.  
  69. \def\makeescape#1{\catcode`#1=0 }
  70. \def\makebgroup#1{\catcode`#1=1 }
  71. \def\makeegroup#1{\catcode`#1=2 }
  72. \def\makemath#1{\catcode`#1=3 }
  73. \def\makealign#1{\catcode`#1=4 }
  74. \def\makeeol#1{\catcode`#1=5 }
  75. \def\makeparm#1{\catcode`#1=6 }
  76. \def\makesup#1{\catcode`#1=7 }
  77. \def\makesub#1{\catcode`#1=8 }
  78. \def\makeignore#1{\catcode`#1=9 }
  79. \def\makespace#1{\catcode`#1=10 }
  80. \def\makeletter#1{\catcode`#1=11 }
  81. \def\makeother#1{\catcode`#1=12 }
  82. \def\makeactive#1{\catcode`#1=13 }
  83. \def\makecomment#1{\catcode`#1=14 }
  84.  
  85. \def\makeatletter{\catcode`\@=11 }      % included for historical reasons
  86. \chardef\other=12
  87. \def\makeatother{\catcode`\@=\other}
  88.  
  89.                                         % alternative to localization
  90. \def\savecat#1{%
  91.   \expandafter\xdef\csname\string#1savedcat\endcsname{\the\catcode`#1}}
  92. \def\restorecat#1{\catcode`#1=\csname\string#1savedcat\endcsname}
  93.  
  94.  
  95. \savecat\@
  96. \makeletter\@           % used, as in PLAIN, in protected control sequences
  97.  
  98.                         % for restoring meanings of global control sequences
  99. \def\SaveCS#1{%
  100.   \def\scratch{\expandafter\let\csname saved@@#1\endcsname}%
  101.   \expandafter\scratch\csname#1\endcsname}
  102. \def\RestoreCS#1{%
  103.   \def\scratch{\expandafter\let\csname#1\endcsname}%
  104.   \expandafter\scratch\csname saved@@#1\endcsname}
  105.  
  106.  
  107. % To distinguish between macro files loaded
  108.  
  109. \def\plaintubstyle{plain}
  110. \def\latextubstyle{latex}
  111. \ifx\tugstyloaded@\undefined\let\tugstyloaded@\plaintubstyle\fi
  112.  
  113. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  114. %
  115. %     *****  abbreviations and logos  *****
  116. %
  117.  
  118. \def\AllTeX{(\La)\TeX}
  119.  
  120. \def\AMS{American Mathematical Society}
  121.  
  122. \def\AmS{{\the\textfont2 A}\kern-.1667em\lower.5ex\hbox
  123.         {\the\textfont2 M}\kern-.125em{\the\textfont2 S}}
  124. \def\AmSTeX{\AmS-\TeX}
  125.  
  126. \def\aw{A\kern.1em-W}
  127. \def\AW{Addison\kern.1em-\penalty\z@\hskip\z@skip Wesley}
  128.  
  129. \def\BibTeX{{\rm B\kern-.05em{\smc i\kern-.025emb}\kern-.08em\TeX}}
  130.  
  131. \def\CandT{{\sl Computers \& Typesetting}}
  132.  
  133. \def\DVItoVDU{DVIto\kern-.12em VDU}
  134.  
  135. %       Japanese TeX
  136. \def\JTeX{\leavevmode\hbox{\lower.5ex\hbox{J}\kern-.18em\TeX}}
  137.  
  138. \def\JoT{{\sl The Joy of \TeX}}
  139.  
  140. \def\LAMSTeX{L\raise.42ex\hbox{\kern-.3em\the\scriptfont2 A}%
  141.     \kern-.2em\lower.376ex\hbox{\the\textfont2 M}\kern-.125em
  142.     {\the\textfont2 S}-\TeX}
  143.  
  144. %       note -- \LaTeX definition is from LATEX.TEX 2.09 of 7 Jan 86,
  145. %               adapted for additional flexibility in TUGboat
  146. %\def\LaTeX{\TestCount=\the\fam \leavevmode L\raise.42ex
  147. %       \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}\kern-.15em\TeX}
  148. %       note -- broken in two parts, to permit separate use of La,
  149. %               as in (La)TeX
  150. \def\La{\TestCount=\the\fam \leavevmode L\raise.42ex
  151.         \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}}
  152. \def\LaTeX{\La\kern-.15em\TeX}
  153.  
  154. %       for Robert McGaffey
  155. \def\Mc{\setbox\TestBox=\hbox{M}M\vbox to\ht\TestBox{\hbox{c}\vfil}}
  156.  
  157. \font\manual=logo10 % font used for the METAFONT logo, etc.
  158. \def\MF{{\manual META}\-{\manual FONT}}
  159. \def\mf{{\smc Metafont}}
  160. \def\MFB{{\sl The \slMF book}}
  161.  
  162. %       multilingual (INRS) TeX
  163. \def\mtex{T\kern-.1667em\lower.5ex\hbox{\^E}\kern-.125emX}
  164.  
  165. \def\pcMF{\leavevmode\raise.5ex\hbox{p\kern-.3ptc}MF}
  166. \def\PCTeX{PC\thinspace\TeX}
  167. \def\pcTeX{\leavevmode\raise.5ex\hbox{p\kern-.3ptc}\TeX}
  168.  
  169. \def\Pas{Pascal}
  170.  
  171. \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC}
  172. \def\PiCTeX{\PiC\kern-.11em\TeX}
  173.  
  174. \def\plain{{\tt plain}}
  175.  
  176. \def\POBox{P.\thinspace O.~Box }
  177. \def\POBoxTUG{\POBox\unskip~9506, Providence, RI~02940}
  178.  
  179. \def\PS{{Post\-Script}}
  180.  
  181. \def\SC{Steering Committee}
  182.  
  183. \def\SliTeX{{\rm S\kern-.06em{\smc l\kern-.035emi}\kern-.06em\TeX}}
  184.  
  185. \def\slMF{\MF}
  186. %       Use \font\manualsl=logosl10 instead, if it's available,
  187. %       for \def\slMF{{\manualsl META}\-{\manualsl FONT}}
  188.  
  189. %       Atari ST (Klaus Guntermann)
  190. \def\stTeX{{\smc st\rm\kern-0.13em\TeX}}
  191.  
  192. \def\TANGLE{{\tt TANGLE}}
  193.  
  194. \def\TB{{\sl The \TeX book}}
  195. \def\TP{{\sl \TeX\/}: {\sl The Program\/}}
  196.  
  197. \def\TeX{T\hbox{\kern-.1667em\lower.424ex\hbox{E}\kern-.125emX}}
  198.  
  199. \def\TeXhax{\TeX hax}
  200.  
  201. %       Don Hosek
  202. \def\TeXMaG{\TeX M\kern-.1667em\lower.5ex\hbox{A}\kern-.2267emG}
  203.  
  204. %\def\TeXtures{\TestCount=\the\fam
  205. %       \TeX\-\hbox{$\fam\TestCount\scriptstyle TURES$}}
  206. \def\TeXtures{{\it Textures}}
  207.  
  208. \def\TeXXeT{\TeX--X\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT}
  209.  
  210. \def\tubfont{\sl}               % redefined in other situations
  211. \def\TUB{{\tubfont TUGboat\/}}
  212.  
  213. \def\TUG{\TeX\ \UG}
  214.  
  215. \def\UG{Users Group}
  216.  
  217. \def\UNIX{{\smc unix}}
  218.  
  219. \def\VAX{\leavevmode\hbox{V\kern-.12em A\kern-.1em X}}
  220.  
  221. \def\VorTeX{V\kern-2.7pt\lower.5ex\hbox{O\kern-1.4pt R}\kern-2.6pt\TeX}
  222.  
  223. \def\XeT{\leavevmode\hbox{X\kern-.125em\lower.424ex\hbox{E}\kern-.1667emT}}
  224.  
  225. \def\WEB{{\tt WEB}}
  226. \def\WEAVE{{\tt WEAVE}}
  227.  
  228.  
  229.  
  230. %********************************************************************
  231.  
  232. \newlinechar=`\^^J
  233. \normallineskiplimit=1pt
  234.  
  235. \clubpenalty=10000
  236. \widowpenalty=10000
  237.  
  238. \def\NoParIndent{\parindent=\z@}
  239. \newdimen\normalparindent        \normalparindent=20pt          % plain = 20pt
  240. \def\NormalParIndent{\global\parindent=\normalparindent}
  241. \NormalParIndent
  242.  
  243. \def\BlackBoxes{\overfullrule=5pt }
  244. \def\NoBlackBoxes{\overfullrule=\z@ }
  245. \def\newline{\hskip\z@ plus \pagewd \break}
  246. \def\nohyphens{\hyphenpenalty\@M\exhyphenpenalty\@M}
  247.  
  248. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  249. %
  250. %     *****  utility registers and definitions  *****
  251. %
  252.  
  253. %       test registers for transient use; paired - internal/external
  254. \newbox\T@stBox                 \newbox\TestBox
  255. \newcount\T@stCount             \newcount\TestCount
  256. \newdimen\T@stDimen             \newdimen\TestDimen
  257. \newif\ifT@stIf                 \newif\ifTestIf
  258.  
  259.  
  260. %       \cs existence test, stolen from TeXbook exercise 7.7
  261. \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax }
  262.  
  263. % LaTeX conventions which are also useful here.
  264. \ifx\tugstyloaded@\plaintubstyle
  265.   \let\@@input\input
  266.   \def\iinput#1{\@@input#1 }
  267.   \def\@inputcheck{\if\@nextchar\bgroup
  268.     \expandafter\iinput\else\expandafter\@@input\fi}
  269.   \def\input{\futurelet\@nextchar\@inputcheck}
  270. \fi
  271.  
  272. %       Smashes repeated from AMS-TeX; PLAIN implements only full \smash .
  273. \newif\iftop@           \newif\ifbot@
  274. \def\topsmash{\top@true\bot@false\smash@}
  275. \def\botsmash{\top@false\bot@true\smash@}
  276. \def\smash{\top@true\bot@true\smash@}
  277. \def\smash@{\relax\ifmmode\def\next{\mathpalette\mathsm@sh}%
  278.         \else\let\next\makesm@sh\fi \next }
  279. \def\finsm@sh{\iftop@\ht\z@\z@\fi\ifbot@\dp\z@\z@\fi\box\z@}
  280.  
  281.  
  282. %       Vertical `laps'; cf. \llap and \rlap
  283. \long\def\ulap#1{\vbox to \z@{\vss#1}}
  284. \long\def\dlap#1{\vbox to \z@{#1\vss}}
  285.  
  286. %       And centered horizontal and vertical `laps'
  287. \def\xlap#1{\hbox to \z@{\hss#1\hss}}
  288. \long\def\ylap#1{\vbox to \z@{\vss#1\vss}}
  289. \long\def\zlap#1{\ylap{\xlap{#1}}}
  290.  
  291.  
  292. %       Avoid unwanted vertical glue when making up pages.
  293. \def\basezero{\baselineskip\z@skip \lineskip\z@skip}
  294.  
  295.  
  296. %  Empty rules for special occasions
  297. \def\nullhrule{\hrule height\z@ depth\z@ width\z@ }
  298. \def\nullvrule{\vrule height\z@ depth\z@ width\z@ }
  299.  
  300. %       Support ad-hoc strut construction.
  301. \def\makestrut[#1;#2]{\vrule height#1 depth#2 width\z@ }
  302.  
  303.  
  304. %       Today's date, to be printed on drafts.  Based on TeXbook, p.406.
  305.  
  306. \def\today{\number\day\space \ifcase\month\or
  307.         Jan \or Feb \or Mar \or Apr \or May \or Jun \or
  308.         Jul \or Aug \or Sep \or Oct \or Nov \or Dec \fi
  309.         \number\year}
  310.  
  311. %       Current time; this may be system dependent!
  312. \newcount\hours
  313. \newcount\minutes
  314. \def\SetTime{\hours=\time
  315.         \global\divide\hours by 60
  316.         \minutes=\hours
  317.         \multiply\minutes by 60
  318.         \advance\minutes by-\time
  319.         \global\multiply\minutes by-1 }
  320. \SetTime
  321. \def\now{\number\hours:\ifnum\minutes<10 0\fi\number\minutes}
  322.  
  323. \def\Now{\today\ \now}
  324.  
  325. \newif\ifPrelimDraft            \PrelimDraftfalse
  326.  
  327. %!!!!!!!!!!!!!!!!!!!!!!!!!
  328. \@ifundefined{selectfont}
  329.    {
  330.    \def\midrtitle{\ifPrelimDraft {{\tensl preliminary draft, \Now}}\fi}
  331.    }
  332.    {
  333.    \def\midrtitle{\ifPrelimDraft {{\size{10}{12pt}\sl preliminary draft, \Now}}\fi}
  334.    }
  335.  
  336. %  Section heads.  The following set of macros is used to set the large
  337. %  TUGboat section heads (e.g. "General Delivery", "Fonts", etc.)
  338.  
  339. \newdimen\PreTitleDrop   \PreTitleDrop=\z@
  340.  
  341. \newskip\AboveTitleSkip  \AboveTitleSkip=12pt
  342. \newskip\BelowTitleSkip  \BelowTitleSkip=8pt
  343.  
  344. \newdimen\strulethickness       \strulethickness=.6pt
  345. \def\sthrule{\hrule height\strulethickness depth \z@ }
  346. \def\stvrule{\vrule width\strulethickness }
  347.  
  348. \newdimen\stbaselineskip        \stbaselineskip=18pt
  349.  
  350. \def\@sectitle #1{%
  351.   \par \SecTitletrue
  352.   \penalty-1000
  353.   \secsep
  354.   \vbox{
  355.     \sthrule
  356.     \hbox{%
  357.       \stvrule
  358.       \vbox{
  359.         \advance\hsize by -2\strulethickness
  360.         \raggedcenter
  361.         \def\\{\unskip\break}%
  362.         \sectitlefont
  363.         \makestrut[2\stfontheight;\z@]
  364.         #1%
  365.         \makestrut[\z@;\stfontheight]\endgraf
  366.         }%
  367.       \stvrule }
  368.     \sthrule }
  369.   \nobreak
  370.   \vskip\baselineskip }
  371.  
  372. %  distance between articles which are run together
  373. \def\secsep{\vskip 5\baselineskip}
  374.  
  375. \newif\ifSecTitle
  376. \SecTitlefalse
  377.  
  378.  
  379.  
  380.  
  381.  
  382. %  Registration marks
  383.  
  384. \def\HorzR@gisterRule{\vrule height 0.2pt depth \z@ width 0.5in }
  385. \def\DownShortR@gisterRule{\vrule height 0.2pt depth 1pc width 0.2pt }
  386. \def\UpShortR@gisterRule{\vrule height 1pc depth \z@ width 0.2pt }
  387.  
  388.  
  389. %               ``T'' marks centered on top and bottom edges of paper
  390.  
  391. \def\ttopregister{\dlap{%
  392.         \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
  393.                         \HorzR@gisterRule \hfil \HorzR@gisterRule}%
  394.         \hbox to \trimwd{\hfil \DownShortR@gisterRule \hfil}}}
  395. \def\tbotregister{\ulap{%
  396.         \hbox to \trimwd{\hfil \UpShortR@gisterRule \hfil}%
  397.         \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
  398.                         \HorzR@gisterRule \hfil \HorzR@gisterRule}}}
  399.  
  400. \def\topregister{\ttopregister}
  401. \def\botregister{\tbotregister}
  402.  
  403.  
  404.  
  405. %       PLAIN's definition of \raggedright doesn't permit any stretch, and
  406. %       results in too many overfull boxes.  We also turn off hyphenation.
  407. \newdimen\raggedskip    \raggedskip=\z@
  408. \newdimen\raggedstretch \raggedstretch=5em    % ems of font set now (10pt)
  409. \newskip\raggedparfill  \raggedparfill=\z@ plus 1fil
  410.  
  411. \def\raggedspaces{\spaceskip=.3333em \relax \xspaceskip=.5em \relax }
  412. %       Some applications may have to add stretch, in order to avoid
  413. %       all overfull boxes.
  414.  
  415. \def\raggedright{%
  416.   \nohyphens
  417.   \rightskip=\raggedskip plus\raggedstretch \raggedspaces
  418.   \parfillskip=\raggedparfill }
  419. \def\raggedleft{%
  420.   \nohyphens
  421.   \leftskip=\raggedskip plus\raggedstretch \raggedspaces
  422.   \parfillskip=\z@skip }
  423. \def\raggedcenter{%
  424.   \nohyphens
  425.   \leftskip=\raggedskip plus\raggedstretch
  426.   \rightskip=\leftskip \raggedspaces
  427.   \parindent=\z@ \parfillskip=\z@skip }
  428.  
  429. \def\normalspaces{\spaceskip\z@skip \xspaceskip\z@skip }
  430.  
  431.  
  432. %       Miscellaneous useful stuff
  433.  
  434. \def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
  435.  
  436. %\def~{\penalty\@M \ } % tie -- this is PLAIN value; it is reset in AMS-TeX
  437. \def~{\unskip\nobreak\ \ignorespaces} % AMS-TeX value
  438.  
  439. \def\newbox{\alloc@4\box\chardef\insc@unt}   % remove \outer
  440. \def\boxcs#1{\box\csname#1\endcsname}
  441. \def\setboxcs#1{\setbox\csname#1\endcsname}
  442. \def\newboxcs#1{\expandafter\newbox\csname#1\endcsname}
  443.  
  444. \def\gobble#1{}
  445.  
  446. \def\vellipsis{%
  447.   \leavevmode\kern0.5em
  448.   \raise1pt\vbox{\baselineskip6pt\vskip7pt\hbox{.}\hbox{.}\hbox{.}}
  449.   }
  450.  
  451. \def\bull{\vrule height 1ex width .8ex depth -.2ex } % square bullet
  452. \def\cents{{\rm\raise.2ex\rlap{\kern.05em$\scriptstyle/$}c}}
  453. \def\Dag{\raise .6ex\hbox{$\scriptstyle\dagger$}}
  454.  
  455. \def\careof{\leavevmode\hbox{\raise.75ex\hbox{c}\kern-.15em
  456.                 /\kern-.125em\smash{\lower.3ex\hbox{o}}} \ignorespaces}
  457. \def\sfrac#1/#2{\leavevmode\kern.1em
  458.         \raise.5ex\hbox{\the\scriptfont\z@ #1}\kern-.1em
  459.         /\kern-.15em\lower.25ex\hbox{\the\scriptfont\z@ #2}}
  460.  
  461. \def\thinskip{\hskip 0.16667em\relax}
  462. \def\endash{--}
  463. \def\emdash{\endash-}
  464. \def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces}
  465. \def\dash{\d@sh\nobreak\endash}
  466. \def\Dash{\d@sh\nobreak\emdash}
  467. \def\ldash{\d@sh\empty{\hbox{\endash}\nobreak}}
  468. \def\rdash{\d@sh\nobreak\endash}
  469. \def\Ldash{\d@sh\empty{\hbox{\emdash}\nobreak}}
  470. \def\Rdash{\d@sh\nobreak\emdash}
  471.  
  472. %       Hack to permit automatic hyphenation after an actual hyphen.
  473.  
  474. \def\hyph{-\penalty\z@\hskip\z@skip }
  475.  
  476. \def\slash{/\penalty\z@\hskip\z@skip }        % "breakable" slash
  477.  
  478. %  So far, \nth{n} works only for 0 <= n <= 20.
  479. \def\nth#1{\TestCount=#1
  480.     \ifcase\TestCount \def\next{th}%    0th
  481.     \or   \def\next{st}%                1st
  482.     \or   \def\next{nd}%                2nd
  483.     \or   \def\next{rd}%                3rd
  484.     \else \def\next{th}%                nth
  485.     \fi \TestCount=\the\fam\relax #1$^{\fam\TestCount\next}$}
  486.  
  487.  
  488. %       Dates and other items which identify the volume and issue
  489.  
  490. %       To use: \vol 5, 2.
  491. %               \issdate October 1984.
  492. %               \issueseqno=10
  493. %       For production, these are set in a separate file, TUGBOT.DATES,
  494. %       which is issue-specific.
  495.  
  496. \newcount\issueseqno            \issueseqno=-1
  497.  
  498. \def\v@lx{\gdef\volx{Volume~\volno~(\volyr), No.~\issno}}
  499. \def\volyr{}
  500. \def\volno{}
  501. \def\vol #1,#2.{\gdef\volno{#1\unskip}%
  502.         \gdef\issno{\ignorespaces#2\unskip}%
  503.         \setbox\TestBox=\hbox{\volyr}%
  504.         \ifdim \wd\TestBox > .2em \v@lx \fi }
  505.  
  506. \def\issdate #1#2 #3.{\gdef\issdt{#1#2 #3}\gdef\volyr{#3}%
  507.         \gdef\bigissdt{#1{\smc\uppercase{#2}} #3}%
  508.         \setbox\TestBox=\hbox{\volno}%
  509.         \ifdim \wd\TestBox > .2em \v@lx \fi }
  510.  
  511.  
  512. \vol 0, 0.                      % volume, issue.
  513. \issdate Thermidor, 2001.       % month, year of publication
  514.  
  515.  
  516. \ifx\tugstyloaded@\plaintubstyle
  517.   \def\tubissue#1(#2){\TUB~#1, no.~#2}
  518. \else
  519.   \def\tubissue#1#2{\TUB~#1, no.~#2}
  520. \fi
  521.  
  522. \def\xEdNote{{\tenuit Editor's note:\enspace }}
  523.  
  524.  
  525. %       TUGboat conventions include the issue number in the file name.
  526. %       Permit this to be incorporated into file names automatically.
  527. %       If issue number = 11, \Input filnam  will read tb11filnam.tex.
  528.  
  529.  
  530. \def\infil@{\jobname}
  531. \def\Input #1 {\ifnum\issueseqno<0 \def\infil@{#1}%
  532.                 \else \def\infil@{tb\number\issueseqno#1}\fi
  533.                 \edef\jobname{\infil@}\@readFLN
  534.                 \@@input \infil@\relax
  535.                 \ifRMKopen\immediate\closeout\TBremarkfile\RMKopenfalse\fi}
  536.  
  537. \newif\ifRMKopen        \RMKopenfalse
  538. \newwrite\TBremarkfile
  539. \def\TBremarkON#1{%
  540.   \ifRMKopen\else\RMKopentrue\immediate\openout\TBremarkfile=\infil@.rmk \fi
  541.   \toks@={#1}%
  542.   \immediate\write\TBremarkfile{^^J\the\toks@}%
  543.   \immediate\write16{^^JTBremark:: \the\toks@^^J}}
  544. \def\TBremarkOFF#1{}
  545. \let\TBremark=\TBremarkOFF
  546.  
  547. % for marking locations in articles that pertain to remarks
  548. % in another file of editorial comments
  549. \def\TUBedit#1{}
  550.  
  551. % for using different filenames in Providence than those supplied
  552. % by authors
  553.  
  554. \def\TUBfilename#1#2{\expandafter\def\csname file@@#1\endcsname{#2}}
  555. \newread\@altfilenames
  556. \def\@readFLN{\immediate\openin\@altfilenames=\jobname.fln
  557.   \ifeof\@altfilenames\let\@result\relax\else
  558.   \def\@result{\@@input\jobname.fln }\fi
  559.   \immediate\closein\@altfilenames
  560.   \@result}
  561. \@readFLN
  562. \everyjob=\expandafter{\the\everyjob\@readFLN}
  563.  
  564. % Following needs to work entirely in TeX's mouth
  565. \def\@tubfilename#1{\expandafter\ifx\csname file@@#1\endcsname\relax
  566.   #1\else\csname file@@#1\endcsname\fi}
  567.  
  568. \def\fileinput#1{\@@input\@tubfilename{#1} }
  569.  
  570. %       Write out (both to a file and to the log) the starting page number
  571. %       of an article, to be used for cross references and in contents.
  572. %       \pagexref  is used for articles fully processed in the TUGboat run.
  573. %       \PageXref  is used for "extra" pages, where an item is submitted
  574. %               as camera copy, and only running heads (at most) are run.
  575.  
  576. \ifx\tugstyloaded@\plaintubstyle
  577. \def\pagexrefON#1{%
  578.         \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}%
  579.         \write\ppoutfile{%
  580.                 \def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}%
  581.         }
  582. \def\PageXrefON#1{%
  583.         \immediate\write-1{\def\expandafter
  584.                         \noexpand\csname#1\endcsname{\number\pageno}}%
  585.         \immediate\write\ppoutfile{\def\expandafter
  586.                         \noexpand\csname#1\endcsname{\number\pageno}}}
  587. \else
  588. \def\pagexrefON#1{%
  589.         \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
  590.         \write\ppoutfile{%
  591.                 \def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
  592.         }
  593. \def\PageXrefON#1{%
  594.         \immediate\write-1{\def\expandafter
  595.                         \noexpand\csname#1\endcsname{\number\c@page}}%
  596.         \immediate\write\ppoutfile{\def\expandafter
  597.                         \noexpand\csname#1\endcsname{\number\c@page}}}
  598. \fi
  599.  
  600. \def\pagexrefOFF#1{}
  601. \let\pagexref=\pagexrefOFF
  602. \def\PageXrefOFF#1{}
  603. \let\PageXref=\PageXrefOFF
  604.  
  605. \def\xreftoON#1{%
  606.   \ifundefined{#1}%
  607.     ???\TBremark{Need cross reference for #1.}%
  608.   \else\csname#1\endcsname\fi}
  609. \def\xreftoOFF#1{???}
  610. \let\xrefto=\xreftoOFF
  611.  
  612. \def\TBdriver#1{}
  613.  
  614.  
  615. %  Authors, addresses, signatures
  616.  
  617. \def\theauthor#1{\csname theauthor#1\endcsname}
  618. \def\theaddress#1{\csname theaddress#1\endcsname}
  619. \def\thenetaddress#1{\csname thenetaddress#1\endcsname}
  620.  
  621. \newcount\count@@
  622. \def\@defaultauthorlist{%         % standard way of listing authors
  623.    \count@=\authornumber
  624.    \advance\count@ by -2
  625.    \count@@=0
  626.    \loop
  627.    \ifnum\count@>0
  628.       \advance\count@@ by 1
  629.       \ignorespaces\csname theauthor\number\count@@\endcsname\unskip,
  630.       \advance\count@ by -1
  631.    \repeat
  632.    \count@=\authornumber
  633.    \advance\count@ by -\count@@
  634.    \ifnum\authornumber>0
  635.      \ifnum\count@>1
  636.        \count@=\authornumber
  637.        \advance\count@ by -1
  638.        \ignorespaces\csname theauthor\number\count@\endcsname\unskip\ and
  639.        \fi
  640.      \ignorespaces\csname theauthor\number\authornumber\endcsname\unskip
  641.    \fi
  642.   }
  643.  
  644. \def\signature#1{\def\@signature{#1}}
  645. \def\@signature{\@defaultsignature}
  646.  
  647. \def\@defaultsignature{%
  648.   \count@=0
  649.   \loop
  650.   \ifnum\count@<\authornumber
  651.     \medskip
  652.     \advance\count@ by \@ne
  653.     \signaturemark
  654.     \theauthor{\number\count@}\\
  655.     \leavevmode\theaddress{\number\count@}\\
  656.     \leavevmode\thenetaddress{\number\count@}\\
  657.   \repeat
  658.   }
  659.  
  660. \newdimen\signaturewidth   \signaturewidth=12pc
  661. \def\makesignature{%
  662.   \par
  663.   \penalty9000
  664.   \vskip\medskipamount
  665.   \rightline{%
  666.     \vbox{\hsize\signaturewidth \ninepoint \raggedright
  667.       \parindent \z@ \everypar={\hangindent 1pc }
  668.       \parskip \z@skip
  669.       \netaddrat
  670.       \netaddrpercent
  671.       \def\|{\unskip\hfil\break}%
  672.       \def\\{\endgraf}%
  673.       \def\net{\tt}%
  674.       \def\phone{\rm Phone: } \rm
  675.       \@signature}}
  676.   }
  677.  
  678. {\makeactive\@
  679.  \gdef\signatureat{\makeactive\@\def@{\char"40\discretionary{}{}{}}}
  680.  \makeactive\%
  681.  \gdef\signaturepercent{\makeactive\%\def%{\char"25\discretionary{}{}{}}}
  682. }
  683.  
  684. \def\signaturemark{\leavevmode\llap{$\diamond$\enspace}}
  685.  
  686.  
  687.  
  688.  
  689. %       some hyphenation exceptions:
  690. \hyphenation{man-u-script man-u-scripts}
  691.  
  692.  
  693. \restorecat\@
  694.  
  695. \endinput
  696.  
  697.  
  698. % *************************************************************************
  699.  
  700. Contents and Notes
  701. ------------------
  702.  
  703. \makeescape, ..., \makecomment allow users to change category
  704. codes a little more easily.
  705.  
  706. \savecat#1 and \restorecat#1 will save and restore the category
  707. of a given character.  These are useful in cases where one doesn't
  708. wish to localize the settings and therefore be required to globally
  709. define or set things.
  710.  
  711. \SaveCS#1 and \RestoreCS#1 save and restore `meanings' of control
  712. sequences.  Again this is useful in cases where one doesn't want to
  713. localize or where global definitions clobber a control sequence which
  714. is needed later with its `old' definition.
  715.  
  716. Abbreviations.  Just a listing with indications of expansion where
  717. that may not be obvious.  For full definitions, see real code above.
  718.  
  719. \AllTeX         (\La)\TeX
  720. \AMS            American Mathematical Society
  721. \AmSTeX
  722. \aw             A-W (abbreviation for Addison-Wesley)
  723. \AW             Addison Wesley
  724. \BibTeX
  725. \CandT          Computers \& Typesetting
  726. \DVItoVDU       DVItoVDU
  727. \JTeX
  728. \JoT            The Joy of \TeX
  729. \LaTeX
  730. \Mc             M ``w/ raised c''
  731. \MF             METAFONT
  732. \mf             Metafont (using small caps)
  733. \MFB            The Metafont book
  734. \mtex           multilingual TeX
  735. \pcMF           pcMF
  736. \PCTeX
  737. \pcTeX
  738. \Pas            Pascal
  739. \PiCTeX
  740. \plain          plain (in typewriter font)
  741. \POBox          P. O. Box
  742. \POBoxTUG       TUG PO Box
  743. \PS             PostScript
  744. \SC             Steering Committee
  745. \SliTeX
  746. \slMF           Metafont (slanted)
  747. \stTeX          TeX for the Atari ST
  748. \TANGLE
  749. \TB             The \TeX book
  750. \TeX
  751. \TeXhax
  752. \TeXMaG
  753. \TeXtures
  754. \TeXXeT
  755. \TUB            TUGboat
  756. \TUG            TeX Users Group
  757. \UNIX
  758. \VAX
  759. \VorTeX
  760. \XeT
  761. \WEB
  762. \WEAVE
  763.  
  764. \NoBlackBoxes           turns off marginal rules marking overfull boxes
  765. \BlackBoxes             turns them back on
  766. \newline                horizontal glue plus a break
  767.  
  768. \ifundefined#1          checks argument with \csname against \relax
  769.  
  770. \topsmash               smashes above baseline  (from AMSTeX)
  771. \botsmash               smashes below baseline  (from AMSTeX)
  772. \smash                  smashes both            (from plain)
  773.  
  774. \ulap                   lap upwards
  775. \dlap                   lap downwards
  776. \xlap                   reference point at center horizontally; 0 width
  777. \ylap                   reference point at center vertically; 0 height, depth
  778. \zlap                   combination \xlap and \ylap
  779.  
  780. \basezero               to avoid insertion of baselineskip and lineskip glue
  781.  
  782. \nullhrule              empty \hrule
  783. \nullvrule              empty \vrule
  784.  
  785. \makestrut[#1;#2]       ad hoc struts;  #1=height, #2=depth
  786.  
  787. \today                  today's date
  788. \SetTime                converts \time to hours, minutes
  789. \now                    displays time in hours and minutes
  790. \Now                    shows current date and time
  791.  
  792. \ifPrelimDraft          flag to indicate status as preliminary draft
  793.  
  794. \rtitlex                TUGboat volume and number info for running head
  795. \midrtitle              information for center of running head
  796.  
  797. \HorzR@gisterRule       pieces of registration marks ("trimmarks")
  798. \DownShortR@gisterRule
  799. \UpShortR@gisterRule
  800.  
  801. \ttopregister           top registration line with `T' in center
  802. \tbotregister           bottom registration line with inverted `T' in center
  803. \topregister            register actually used
  804. \botregister
  805.  
  806.  
  807. \raggedskip             parameters used for ragged settings
  808. \raggedstretch
  809. \raggedparfill
  810. \raggedspaces
  811.  
  812. \raggedright
  813. \raggedleft
  814. \raggedcenter
  815. \normalspaces
  816. \raggedbottom
  817.  
  818. \bull                   square bullet
  819. \cents                  ``cents'' sign
  820. \Dag                    superscripted dagger
  821. \careof                 c/o
  822. \sfrac                  slashed fraction
  823.  
  824. \dash                   en-dash surrounded by thinspaces; only breakable AFTER
  825. \Dash                   em-dash, as above
  826.  
  827. \hyph                   permit automatic hyphenation after an actual hyphen
  828.  
  829. \slash                  "breakable" slash
  830. \nth                    for obtaining "1^{st}", "2^{nd}", 3^{rd}, etc.
  831.  
  832. \tubissue               gets \TUB followed by volume and issue numbers
  833.  
  834. \xEdNote                Editor's Note:
  835.  
  836. \Input                  \input with some other bookkeepping for
  837.                         case where multiple articles are put together
  838.  
  839. \TBremark               reminder to TUGboat editorial staff
  840. \TBremarkON
  841. \TBremarkOFF
  842.  
  843. \pagexref               used to write out page numbers to screen and
  844. \pagexrefON             external files
  845. \pagexrefOFF
  846. \PageXref
  847. \PageXrefON
  848. \PageXrefOFF
  849.  
  850. \xrefto                 used for symbolic cross-reference to other pages
  851. \xreftoON               in TUGboat
  852. \xreftoOFF
  853.  
  854. \TBdriver               marks code which only takes effect when articles
  855.                         are run together in a driver file
  856.  
  857. \signatureat            items for signatures
  858. \signaturepercent
  859. \signaturemark
  860. \signaturewidth
  861.  
  862.  
  863. % *************************************************************************
  864.  
  865. % Change history
  866.  
  867. v1.10    8 Mar 92
  868. added \AllTeX
  869. changed file name from .COM to .CMN to avoid objection that .COM files
  870.   have a special significance on DOS and other operating systems
  871. added standard headers, prepared for archive installation
  872.  
  873. v1.09    5 May 91
  874. inserted large penalty at top of \makesignature to inhibit break
  875.   between article and signature
  876.  
  877. v1.08   24 Oct 90
  878. modified signature slightly (took \medskip out of box)
  879. fixed bug in previous rendition of \@readFLN
  880.  
  881. v1.07   16 Oct 90
  882. added \TUBedit to facilitate editorial marking
  883. added \iinput variant from LaTeX; \input redefined now as with LaTeX
  884. added mechanism for local file names in Providence (\TUBfilename,
  885.   \fileinput, etc.)
  886. \tugstyload@ defaults to plain if it's not defined
  887.  
  888. v1.06    3 Aug 90
  889. added \leavevmode to \@defaultsignature so that \everypar is not
  890.   executed inside a group
  891. dash routines modified and corrected (to suppress insertion of
  892.   discretionary node after -- and ---; and to allow hyphenation of
  893.   ensuing word).  Changed \lDash to \Ldash and \rDash to \Rdash.
  894.  
  895. v1.05   29 Mar 90
  896. added \lDash and \rDash for `parenthetical' dashing
  897. added \TP for TeX: The Program
  898. added \relax after file input of \Input
  899. added \relax before \ifmmode of \,
  900.  
  901. v1.04   28 Feb 90
  902. modified pagexref macros to work in both plain and latex styles
  903. (this should NOT affect authors)
  904.  
  905. v1.03   26 Feb 90
  906. removed <tab>s and adjusted definition of \slMF
  907.  
  908. v1.02   25 Feb 90
  909. added definitions of \plaintubissue, \latextubissue
  910. added definition of \tubissue
  911.  
  912. v1.01   19 Feb 90
  913. added \signaturewidth to allow for modification
  914. added \nth to obtain 1^{st}, etc.
  915.  
  916.